<template>
    <div>

        <el-tabs v-model="activeName" >
            <el-tab-pane label="基础信息" name="Datas">

                <el-form :model="model" ref="ruleForm" label-width="100px" class="demo-ruleForm page-form">
                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="检验编号" prop="Number">
                                <el-input v-model="model.Number" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="检验名称" prop="Name">
                                <el-input v-model="model.Name"  :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>

                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="检验方式" prop="Method">
                               <el-input v-model="model.Method" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="产品分类" prop="ProductType">
                               <el-input v-model="model.ProductType"  :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="检验版本" prop="Version">
                               <el-input v-model="model.Version" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>


                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="合格条件" prop="InspectCondition">
                               <el-input v-model="model.InspectCondition" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="检验方案" prop="InspectScenario">
                               <el-input v-model="model.InspectScenario"  :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="工艺标准" prop="RouteStandard">
                               <el-input v-model="model.RouteStandard" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>


                    
                    <el-divider>工序信息</el-divider>
                        

                    <el-row>
                        <el-form-item label="工序编号" prop="ProcessCode">
                               <el-input v-model="model.ProcessCode" :readonly="true"></el-input>
                        </el-form-item>
                    </el-row>

                    <el-row>
                        <el-col :span="8">
                            <el-form-item label="是否启用" prop="EnableFlag" label-width="120px">
                                <el-radio-group v-model="model.EnableFlag" :readonly="true">
                                    <el-radio label="Y">是</el-radio>
                                    <el-radio label="N">否</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                        <el-col :span="8">
                            <el-form-item label="检验数量" prop="Quantity" >
                               <el-input v-model="model.Quantity" :readonly="true"></el-input>
                            </el-form-item>
                        </el-col>
                        
                    </el-row>

                </el-form>
            </el-tab-pane>
            <el-tab-pane label="检测项目" name="BOM">
                <el-table :data="tableData" ref="dataForm" v-loading="isLoading" height="360" >
                    <el-table-column  prop="Name" label="检测名称" :show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="Standard" label="检测标准" :show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="Device" label="检测器具" :show-overflow-tooltip="true"></el-table-column>
                    <el-table-column prop="Remark" label="描述" :show-overflow-tooltip="true"></el-table-column>

                    
                </el-table>
            </el-tab-pane>
        </el-tabs>
 
    </div>
</template>



<script>

export default {
    props: {
        model: {
            require: true,
            type: Object,

        }
    },
    data() {
        return {
            activeName: 'Datas',

            //检测项目数据
            tableData: [],

            isLoading: false,
            
            
        }
    },
    //实例生命周期
    created() {
            this.GetQcProcessStandardItemByNumber(this.model.Number);
    },
    methods: {
        
       
       
        //根据班组编号获取班组附加表
        GetQcProcessStandardItemByNumber(Number) {
            this.isLoading=true;
            this.$http.get('/api/QcProcessStandard/GetQcProcessStandardItemByNumber',{
                params:{
                    Number:Number
                }
            })
            .then(res => {
                this.tableData = res.Data;
                console.log(res);
                this.isLoading=false;
            })
        },





    }
   
}
</script>
 